import React from 'react';

// 自定义语音动画图标组件
const VoiceAnimationIcon: React.FC<{ style?: React.CSSProperties }> = ({ style }) => (
	<span
		className="voice-animation-icon"
		style={{ ...style, display: 'inline-flex', alignItems: 'center', justifyContent: 'center' }}
	>
		<svg
			width="1em"
			height="1em"
			fill="currentColor"
			viewBox="0 0 1000 1000"
			xmlns="http://www.w3.org/2000/svg"
		>
			<rect fill="currentColor" rx="70" ry="70" height="250" width="140" x="0" y="375">
				<animate
					attributeName="height"
					values="250; 500; 250"
					keyTimes="0; 0.5; 1"
					dur="0.8s"
					begin="0s"
					repeatCount="indefinite"
				></animate>
				<animate
					attributeName="y"
					values="375; 250; 375"
					keyTimes="0; 0.5; 1"
					dur="0.8s"
					begin="0s"
					repeatCount="indefinite"
				></animate>
			</rect>
			<rect fill="currentColor" rx="70" ry="70" height="250" width="140" x="286.67" y="375">
				<animate
					attributeName="height"
					values="250; 500; 250"
					keyTimes="0; 0.5; 1"
					dur="0.8s"
					begin="0.2s"
					repeatCount="indefinite"
				></animate>
				<animate
					attributeName="y"
					values="375; 250; 375"
					keyTimes="0; 0.5; 1"
					dur="0.8s"
					begin="0.2s"
					repeatCount="indefinite"
				></animate>
			</rect>
			<rect fill="currentColor" rx="70" ry="70" height="250" width="140" x="573.33" y="375">
				<animate
					attributeName="height"
					values="250; 500; 250"
					keyTimes="0; 0.5; 1"
					dur="0.8s"
					begin="0.4s"
					repeatCount="indefinite"
				></animate>
				<animate
					attributeName="y"
					values="375; 250; 375"
					keyTimes="0; 0.5; 1"
					dur="0.8s"
					begin="0.4s"
					repeatCount="indefinite"
				></animate>
			</rect>
			<rect fill="currentColor" rx="70" ry="70" height="250" width="140" x="860" y="375">
				<animate
					attributeName="height"
					values="250; 500; 250"
					keyTimes="0; 0.5; 1"
					dur="0.8s"
					begin="0.6s"
					repeatCount="indefinite"
				></animate>
				<animate
					attributeName="y"
					values="375; 250; 375"
					keyTimes="0; 0.5; 1"
					dur="0.8s"
					begin="0.6s"
					repeatCount="indefinite"
				></animate>
			</rect>
		</svg>
	</span>
);

export default VoiceAnimationIcon;
